
//
//  GuideMiddleCollectionViewCell.m
//  BeautifulShoppings
//
//  Created by GivenBmli on 16/9/13.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "GuideMiddleCollectionViewCell.h"
#import "GuideMiddleModel.h"
#import "UIImageView+WebCache.h"
#import "TAMacro.h"
@implementation GuideMiddleCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    self  = [super initWithFrame:frame];
    if (self) {
        [self creatSubview:frame];
        
    }
    
    return self;
}
- (void)setGuideMiddleModel:(GuideMiddleModel *)guideMiddleModel{
    if (_guideMiddleModel != guideMiddleModel) {
        
    }
    [self.image_url sd_setImageWithURL:[NSURL URLWithString:guideMiddleModel.image_url] placeholderImage:[UIImage imageNamed:@"站位"]];
    self.LabelId.text = [NSString stringWithFormat:@"%@",guideMiddleModel.target_id];
}
- (void)creatSubview:(CGRect)frame{
    self.image_url = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH / 4.5, SCREEN_WIDTH / 4.5)];
    self.image_url.backgroundColor =  [UIColor colorWithRed:(arc4random()%256/255.0) green:(arc4random()%256/255.0) blue:(arc4random()%256/255.0) alpha:1.0];
    [self.contentView addSubview:self.image_url];
}
@end
